package com.imaginaryphysics.www.simplepairs;


/**
 * Class never needs to be called directly. Scope just not properly set yet.
 * 
 *
 */

class Relationship {

	private Calculation< ? , ?> calculation;
		
	protected <T extends Pairable, R extends Result_block>Relationship(Pair<T> pair, Calculation<T,R> calculation , R result){
	
		this.calculation = calculation;
		calculation.set_result(result);
		calculation.set_objects(pair.get_obj_one() ,pair.get_obj_two() );
	}

	protected void calculate(){
		calculation.run();
	}
	
	protected  Result_block get_result(){
		return calculation.get_result();
	}
}
